Optimal. Leaf size=182 \[ \frac {5 a b \text {ArcTan}(\sinh (c+d x))}{d}-\frac {a^2 \cosh (c+d x)}{d}-\frac {4 b^2 \cosh (c+d x)}{d}+\frac {a^2 \cosh ^3(c+d x)}{3 d}+\frac {b^2 \cosh ^3(c+d x)}{3 d}-\frac {6 b^2 \text {sech}(c+d x)}{d}+\frac {4 b^2 \text {sech}^3(c+d x)}{3 d}-\frac {b^2 \text {sech}^5(c+d x)}{5 d}-\frac {5 a b \sinh (c+d x)}{d}+\frac {5 a b \sinh ^3(c+d x)}{3 d}-\frac {a b \sinh ^3(c+d x) \tanh ^2(c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 182, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 8, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {3747, 2713,
2672, 294, 308, 209, 2670, 276} \begin {gather*} \frac {a^2 \cosh ^3(c+d x)}{3 d}-\frac {a^2 \cosh (c+d x)}{d}+\frac {5 a b \text {ArcTan}(\sinh (c+d x))}{d}+\frac {5 a b \sinh ^3(c+d x)}{3 d}-\frac {5 a b \sinh (c+d x)}{d}-\frac {a b \sinh ^3(c+d x) \tanh ^2(c+d x)}{d}+\frac {b^2 \cosh ^3(c+d x)}{3 d}-\frac {4 b^2 \cosh (c+d x)}{d}-\frac {b^2 \text {sech}^5(c+d x)}{5 d}+\frac {4 b^2 \text {sech}^3(c+d x)}{3 d}-\frac {6 b^2 \text {sech}(c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 276
Rule 294
Rule 308
Rule 2670
Rule 2672
Rule 2713
Rule 3747
Rubi steps
\begin {align*} \int \sinh ^3(c+d x) \left (a+b \tanh ^3(c+d x)\right )^2 \, dx &=i \int \left (-i a^2 \sinh ^3(c+d x)-2 i a b \sinh ^3(c+d x) \tanh ^3(c+d x)-i b^2 \sinh ^3(c+d x) \tanh ^6(c+d x)\right ) \, dx\\ &=a^2 \int \sinh ^3(c+d x) \, dx+(2 a b) \int \sinh ^3(c+d x) \tanh ^3(c+d x) \, dx+b^2 \int \sinh ^3(c+d x) \tanh ^6(c+d x) \, dx\\ &=-\frac {a^2 \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cosh (c+d x)\right )}{d}+\frac {(2 a b) \text {Subst}\left (\int \frac {x^6}{\left (1+x^2\right )^2} \, dx,x,\sinh (c+d x)\right )}{d}+\frac {b^2 \text {Subst}\left (\int \frac {\left (1-x^2\right )^4}{x^6} \, dx,x,\cosh (c+d x)\right )}{d}\\ &=-\frac {a^2 \cosh (c+d x)}{d}+\frac {a^2 \cosh ^3(c+d x)}{3 d}-\frac {a b \sinh ^3(c+d x) \tanh ^2(c+d x)}{d}+\frac {(5 a b) \text {Subst}\left (\int \frac {x^4}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{d}+\frac {b^2 \text {Subst}\left (\int \left (-4+\frac {1}{x^6}-\frac {4}{x^4}+\frac {6}{x^2}+x^2\right ) \, dx,x,\cosh (c+d x)\right )}{d}\\ &=-\frac {a^2 \cosh (c+d x)}{d}-\frac {4 b^2 \cosh (c+d x)}{d}+\frac {a^2 \cosh ^3(c+d x)}{3 d}+\frac {b^2 \cosh ^3(c+d x)}{3 d}-\frac {6 b^2 \text {sech}(c+d x)}{d}+\frac {4 b^2 \text {sech}^3(c+d x)}{3 d}-\frac {b^2 \text {sech}^5(c+d x)}{5 d}-\frac {a b \sinh ^3(c+d x) \tanh ^2(c+d x)}{d}+\frac {(5 a b) \text {Subst}\left (\int \left (-1+x^2+\frac {1}{1+x^2}\right ) \, dx,x,\sinh (c+d x)\right )}{d}\\ &=-\frac {a^2 \cosh (c+d x)}{d}-\frac {4 b^2 \cosh (c+d x)}{d}+\frac {a^2 \cosh ^3(c+d x)}{3 d}+\frac {b^2 \cosh ^3(c+d x)}{3 d}-\frac {6 b^2 \text {sech}(c+d x)}{d}+\frac {4 b^2 \text {sech}^3(c+d x)}{3 d}-\frac {b^2 \text {sech}^5(c+d x)}{5 d}-\frac {5 a b \sinh (c+d x)}{d}+\frac {5 a b \sinh ^3(c+d x)}{3 d}-\frac {a b \sinh ^3(c+d x) \tanh ^2(c+d x)}{d}+\frac {(5 a b) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {5 a b \tan ^{-1}(\sinh (c+d x))}{d}-\frac {a^2 \cosh (c+d x)}{d}-\frac {4 b^2 \cosh (c+d x)}{d}+\frac {a^2 \cosh ^3(c+d x)}{3 d}+\frac {b^2 \cosh ^3(c+d x)}{3 d}-\frac {6 b^2 \text {sech}(c+d x)}{d}+\frac {4 b^2 \text {sech}^3(c+d x)}{3 d}-\frac {b^2 \text {sech}^5(c+d x)}{5 d}-\frac {5 a b \sinh (c+d x)}{d}+\frac {5 a b \sinh ^3(c+d x)}{3 d}-\frac {a b \sinh ^3(c+d x) \tanh ^2(c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.52, size = 121, normalized size = 0.66 \begin {gather*} \frac {-45 \left (a^2+5 b^2\right ) \cosh (c+d x)+5 \left (a^2+b^2\right ) \cosh (3 (c+d x))-2 b \left (-40 b \text {sech}^3(c+d x)+6 b \text {sech}^5(c+d x)-5 a \left (60 \text {ArcTan}\left (\tanh \left (\frac {1}{2} (c+d x)\right )\right )-27 \sinh (c+d x)+\sinh (3 (c+d x))\right )+30 \text {sech}(c+d x) (6 b+a \tanh (c+d x))\right )}{60 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 2.78, size = 345, normalized size = 1.90
method | result | size |
risch | \(\frac {{\mathrm e}^{3 d x +3 c} a^{2}}{24 d}+\frac {{\mathrm e}^{3 d x +3 c} a b}{12 d}+\frac {{\mathrm e}^{3 d x +3 c} b^{2}}{24 d}-\frac {3 \,{\mathrm e}^{d x +c} a^{2}}{8 d}-\frac {9 a b \,{\mathrm e}^{d x +c}}{4 d}-\frac {15 \,{\mathrm e}^{d x +c} b^{2}}{8 d}-\frac {3 \,{\mathrm e}^{-d x -c} a^{2}}{8 d}+\frac {9 \,{\mathrm e}^{-d x -c} a b}{4 d}-\frac {15 \,{\mathrm e}^{-d x -c} b^{2}}{8 d}+\frac {{\mathrm e}^{-3 d x -3 c} a^{2}}{24 d}-\frac {{\mathrm e}^{-3 d x -3 c} a b}{12 d}+\frac {{\mathrm e}^{-3 d x -3 c} b^{2}}{24 d}-\frac {2 b \,{\mathrm e}^{d x +c} \left (15 a \,{\mathrm e}^{8 d x +8 c}+90 b \,{\mathrm e}^{8 d x +8 c}+30 a \,{\mathrm e}^{6 d x +6 c}+280 b \,{\mathrm e}^{6 d x +6 c}+428 b \,{\mathrm e}^{4 d x +4 c}-30 a \,{\mathrm e}^{2 d x +2 c}+280 b \,{\mathrm e}^{2 d x +2 c}-15 a +90 b \right )}{15 d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{5}}+\frac {5 i b a \ln \left ({\mathrm e}^{d x +c}+i\right )}{d}-\frac {5 i b a \ln \left ({\mathrm e}^{d x +c}-i\right )}{d}\) | \(345\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 348 vs.
\(2 (172) = 344\).
time = 0.50, size = 348, normalized size = 1.91 \begin {gather*} -\frac {1}{120} \, b^{2} {\left (\frac {5 \, {\left (45 \, e^{\left (-d x - c\right )} - e^{\left (-3 \, d x - 3 \, c\right )}\right )}}{d} + \frac {200 \, e^{\left (-2 \, d x - 2 \, c\right )} + 2515 \, e^{\left (-4 \, d x - 4 \, c\right )} + 6680 \, e^{\left (-6 \, d x - 6 \, c\right )} + 9073 \, e^{\left (-8 \, d x - 8 \, c\right )} + 5600 \, e^{\left (-10 \, d x - 10 \, c\right )} + 1665 \, e^{\left (-12 \, d x - 12 \, c\right )} - 5}{d {\left (e^{\left (-3 \, d x - 3 \, c\right )} + 5 \, e^{\left (-5 \, d x - 5 \, c\right )} + 10 \, e^{\left (-7 \, d x - 7 \, c\right )} + 10 \, e^{\left (-9 \, d x - 9 \, c\right )} + 5 \, e^{\left (-11 \, d x - 11 \, c\right )} + e^{\left (-13 \, d x - 13 \, c\right )}\right )}}\right )} + \frac {1}{12} \, a b {\left (\frac {27 \, e^{\left (-d x - c\right )} - e^{\left (-3 \, d x - 3 \, c\right )}}{d} - \frac {120 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {25 \, e^{\left (-2 \, d x - 2 \, c\right )} + 77 \, e^{\left (-4 \, d x - 4 \, c\right )} + 3 \, e^{\left (-6 \, d x - 6 \, c\right )} - 1}{d {\left (e^{\left (-3 \, d x - 3 \, c\right )} + 2 \, e^{\left (-5 \, d x - 5 \, c\right )} + e^{\left (-7 \, d x - 7 \, c\right )}\right )}}\right )} + \frac {1}{24} \, a^{2} {\left (\frac {e^{\left (3 \, d x + 3 \, c\right )}}{d} - \frac {9 \, e^{\left (d x + c\right )}}{d} - \frac {9 \, e^{\left (-d x - c\right )}}{d} + \frac {e^{\left (-3 \, d x - 3 \, c\right )}}{d}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 3341 vs.
\(2 (172) = 344\).
time = 0.36, size = 3341, normalized size = 18.36 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tanh ^{3}{\left (c + d x \right )}\right )^{2} \sinh ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.56, size = 289, normalized size = 1.59 \begin {gather*} \frac {1200 \, a b \arctan \left (e^{\left (d x + c\right )}\right ) + 5 \, a^{2} e^{\left (3 \, d x + 3 \, c\right )} + 10 \, a b e^{\left (3 \, d x + 3 \, c\right )} + 5 \, b^{2} e^{\left (3 \, d x + 3 \, c\right )} - 45 \, a^{2} e^{\left (d x + c\right )} - 270 \, a b e^{\left (d x + c\right )} - 225 \, b^{2} e^{\left (d x + c\right )} - 5 \, {\left (9 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} - 54 \, a b e^{\left (2 \, d x + 2 \, c\right )} + 45 \, b^{2} e^{\left (2 \, d x + 2 \, c\right )} - a^{2} + 2 \, a b - b^{2}\right )} e^{\left (-3 \, d x - 3 \, c\right )} - \frac {16 \, {\left (15 \, a b e^{\left (9 \, d x + 9 \, c\right )} + 90 \, b^{2} e^{\left (9 \, d x + 9 \, c\right )} + 30 \, a b e^{\left (7 \, d x + 7 \, c\right )} + 280 \, b^{2} e^{\left (7 \, d x + 7 \, c\right )} + 428 \, b^{2} e^{\left (5 \, d x + 5 \, c\right )} - 30 \, a b e^{\left (3 \, d x + 3 \, c\right )} + 280 \, b^{2} e^{\left (3 \, d x + 3 \, c\right )} - 15 \, a b e^{\left (d x + c\right )} + 90 \, b^{2} e^{\left (d x + c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{5}}}{120 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.44, size = 397, normalized size = 2.18 \begin {gather*} \frac {{\mathrm {e}}^{3\,c+3\,d\,x}\,{\left (a+b\right )}^2}{24\,d}-\frac {{\mathrm {e}}^{c+d\,x}\,\left (3\,a^2+18\,a\,b+15\,b^2\right )}{8\,d}-\frac {{\mathrm {e}}^{-c-d\,x}\,\left (3\,a^2-18\,a\,b+15\,b^2\right )}{8\,d}+\frac {{\mathrm {e}}^{-3\,c-3\,d\,x}\,{\left (a-b\right )}^2}{24\,d}+\frac {10\,\mathrm {atan}\left (\frac {a\,b\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {d^2}}{d\,\sqrt {a^2\,b^2}}\right )\,\sqrt {a^2\,b^2}}{\sqrt {d^2}}-\frac {256\,b^2\,{\mathrm {e}}^{c+d\,x}}{15\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}+\frac {64\,b^2\,{\mathrm {e}}^{c+d\,x}}{5\,d\,\left (4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1\right )}-\frac {32\,b^2\,{\mathrm {e}}^{c+d\,x}}{5\,d\,\left (5\,{\mathrm {e}}^{2\,c+2\,d\,x}+10\,{\mathrm {e}}^{4\,c+4\,d\,x}+10\,{\mathrm {e}}^{6\,c+6\,d\,x}+5\,{\mathrm {e}}^{8\,c+8\,d\,x}+{\mathrm {e}}^{10\,c+10\,d\,x}+1\right )}-\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (6\,b^2+a\,b\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}+\frac {4\,{\mathrm {e}}^{c+d\,x}\,\left (8\,b^2+3\,a\,b\right )}{3\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________